<style type="text/css"> #Survey {
    width: 70%;
    margin: 0 auto;
}
</style>

<section class="container" id="Survey">
    <h3> Instructions </h3>
    <p>
        We are building a voice personal virtual assistant that can help you control all your devices, social accounts, etc.
    </p>
    <p>
        In the following, you will see a cheatsheet containing some of the devices and functions our virtual assistant supports.
        We need you to write us some examples that computing the results returned by theses functions.
        The supported computation includes
    </p>
    <ul>
        <li>maximum</li>
        <li>minimum</li>
        <li>average</li>
        <li>sum</li>
        <li>count</li>
    </ul>

    <h3> Examples: </h3>
    Example 1 (maximum):
    <ul>
        <li><em>Show me my Dropbox file that changed most recently.</em></li>
    </ul>

    Example 2 (average):
    <ul>
        <li><em>Notify me when my average file size in Dropbox becomes smaller than 10KB. </em></li>
    </ul>

    Example 3 (count):
    <ul>
        <li><em>How many files do i have in my Dropbox?</em></li>
    </ul>


    <h3> Your turn now </h3>
    <p>
        Now take your time to read through the cheatsheet.
        Click "START" button if you are ready, and then you will be asked to provide 5 examples
        <b>using the functions in the cheatsheet.</b>
    </p>
    <p>
        Note that once you click the "START" button, <b>the cheatsheet will be removed.</b>
        You will <b>not</b> be able to read them again.
    </p>
    <p>
        When writing your commands,
        do not leave any blanks in your commands, fill them with something you think it's reasonable and useful for you;
        do not use devices that are not in the cheatsheet.
        <b>If more than 2 commands you wrote fail to meet the criteria, your answer might be rejected</b>.
    </p>
    <p>
        You can only do this task once. <b>Multiple submissions from the same user ID will be rejected</b>.
    </p>

    <div id="cheatsheet-picture" style="text-align: center">
        <div>
            <img src="${url}" alt="cheatsheet">
        </div>

        <br>

        <button class="start" onClick="(function() {
            const res = confirm('Warn: once you start, you will no longer see the cheatsheet. Are you ready? ');
            if (res === true) {
                document.getElementById('cheatsheet-picture').style.display = 'none';
                document.getElementById('command-form').style.display='block';
            }
        })(); return false;">START</button>
    </div>

    <div id="command-form" style="display:none">
        <label>Command 1</label>
        <div class="form-group"><textarea class="form-control" cols="120" how="" id="command-1" name="command-1" required="" rows="3"></textarea></div>
        <br>

        <label>Command 2</label>
        <div class="form-group"><textarea class="form-control" cols="120" how="" id="command-2" name="command-2" required="" rows="3"></textarea></div>
        <br>

        <label>Command 3</label>
        <div class="form-group"><textarea class="form-control" cols="120" how="" id="command-3" name="command-3" required="" rows="3"></textarea></div>
        <br>

        <label>Command 4</label>
        <div class="form-group"><textarea class="form-control" cols="120" how="" id="command-4" name="command-4" required="" rows="3"></textarea></div>
        <br>

        <label>Command 5</label>
        <div class="form-group"><textarea class="form-control" cols="120" how="" id="command-5" name="command-5" required="" rows="3"></textarea></div>
        <br>
    </div>

</section>
